package com.situ.mall.controller.front;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import com.situ.mall.pojo.entity.Product;
import com.situ.mall.service.IProductService;

@Controller
@RequestMapping("/product")
public class FrontProductController {
	@Autowired
	private IProductService prductService;

	@RequestMapping("/getProductDetailPage.shtml")
	public String getProductDetailPage(Integer productId, Model model) {
		Product product = prductService.selectById(productId);
		model.addAttribute("product", product);
		return "/front/product_detail";
	}
}
